import React, { Component } from 'react';
import Data01 from './Data01.jsx';
import Method01 from './Method01.jsx';
import Layout1 from '../../layouts/Layout1.js';

export default class ReactData1 extends Component {
	state = {
		total: 1,
		propObj01: 'prop01'
	}
	add03 = () => {
		this.setState({
			total: this.state.total + 1,
		})
	}
	// 渲染函数
    render() {
    	console.log('ReactData1', 'render');
    	return (
			<Layout1>
			    <div onClick={this.add03}>{this.state.total}</div>
				<Data01 outProp01={this.state.propObj01}></Data01>
				<Method01 outProp01={this.state.propObj01}></Method01>
			</Layout1>
		);
    }
};
